<?php

namespace app\index\controller;
use app\index\model\Book;
use think\Session;
class Books extends Base
{
    public function index()
    {
       return Book::all(['user_id'=>Session::get('user')['id']]);
      //  return [__CLASS__,__FUNCTION__];
    }

    public function read($id)
    {
    return Book::get(['user_id'=>Session::get('user')['id'],'id'=>$id]);
       // return [__CLASS__,__FUNCTION__,'id'=>$id];
    }

    public function save(){
        //return [__CLASS__,__FUNCTION__];
    }
    public function update($id){
       // return [__CLASS__,__FUNCTION__,'id'=>$id];
    }

    public function delete($id){
       // return [__CLASS__,__FUNCTION__,'id'=>$id];
    }
}
